import datetime


def w(view):
    def h(request):
        print('装饰器接收参数为:%s' % request)
        if request>10:
            response = view(request)
        else:
            response = '数值太小'
            return response
        print('函数返回结果是%s' % response)
        response = response + 1
        print('装饰器返回的结果是:%s' % response)
        return response

    return h


@w
def view(a):
    print('1执行了,参数是%s' % a)
    a = a + 1
    print('1执行完毕,返回结果是:%s'%a)
    return a


print(view(11))

# def handler2():
#     print('2执行了')

# w(handler1)
# w(handler2)
